/*
 * This source code is part of TWaver 4.0
 *
 * Serva Software PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 * Copyright 2002 - 2011 Serva Software. All rights reserved.
 */

package demo.chart.attachment.chartattachment;

import java.awt.Color;
import java.awt.Font;

import twaver.chart.PercentChart;
import twaver.network.ui.ElementUI;

public class PercentElementAttachment extends ElementAttachment {

	public PercentElementAttachment(String name, ElementUI ui) {
		super(name, ui);
	}

	public PercentElementAttachment(String name, ElementUI ui, boolean minimized, boolean shrinked) {
		super(name, ui, minimized, shrinked);
	}

	private PercentChart chart;

	protected void initChart() {
		chart = new PercentChart();
		chart.setGradient(true);
		chart.setPercentLabelFont(new Font("Forte", Font.PLAIN, 13));
		chart.setPercentLabelColor(Color.blue);
		chart.setSegmentCount(5);
		setChartProperty(chart);
	}
}